﻿Shader "Image Compression"
{
	SubShader
	{
		Pass
		{
			CGPROGRAM
			#pragma vertex VSMain
			#pragma fragment PSMain
			#pragma target 5.0

			static const float2 size = float2(128,128);
		
			static const int palette[16] =
			{
				0x00121413,0x00171a18,0x001c1e1c,0x00212321,
				0x00262827,0x002b2e2c,0x00363937,0x00494c4a,
				0x005b5e5c,0x006c6f6e,0x007f8280,0x00909392,
				0x00a1a4a3,0x00b1b5b3,0x00c2c6c4,0x00d6d9d8
			};

			static const int bitmap[2048] = 
			{
				0x11111111, 0x11211111, 0x22332222, 0x43333222, 0x33333433, 0x43433333, 0x34444444, 0x44454444, 0x44344444, 0x44444444, 0x33333444, 0x32333333, 0x22222233, 0x11111112, 0x00001111, 0x00001110,
				0x11211111, 0x22211121, 0x33233322, 0x33333223, 0x34443333, 0x44444443, 0x34444443, 0x44444444, 0x44344444, 0x45544444, 0x33443434, 0x33333333, 0x22222233, 0x11112122, 0x00011111, 0x00000000,
				0x11111111, 0x22222111, 0x33233222, 0x33333223, 0x44444443, 0x44443444, 0x44444444, 0x44454445, 0x54444444, 0x44445445, 0x43443444, 0x33333343, 0x22232223, 0x11112222, 0x01001111, 0x00000000,
				0x21111111, 0x22222211, 0x33332232, 0x43344333, 0x44334443, 0x44443444, 0x44444454, 0x45554445, 0x55544445, 0x45455555, 0x34444444, 0x33333343, 0x22233333, 0x11122222, 0x01100111, 0x00000000,
				0x21111111, 0x33222222, 0x33333223, 0x44434333, 0x34344444, 0x44444444, 0x54445554, 0x55554455, 0x55454445, 0x45555555, 0x44444544, 0x33444444, 0x33333333, 0x22222222, 0x11111112, 0x00000111,
				0x21111111, 0x22221221, 0x33232222, 0x43434333, 0x34333433, 0x44444544, 0x55444544, 0x44454454, 0x55555445, 0x45455555, 0x44444444, 0x33343444, 0x23333333, 0x21122223, 0x11110111, 0x00000000,
				0x11111111, 0x22322221, 0x23232223, 0x33433333, 0x44444433, 0x43443444, 0x44444444, 0x44454444, 0x44555445, 0x45555555, 0x44444544, 0x33444444, 0x33333333, 0x22222222, 0x11111111, 0x00000111,
				0x11111111, 0x22222222, 0x23332333, 0x34334323, 0x34333443, 0x43444444, 0x44544444, 0x44454444, 0x55455545, 0x45555554, 0x44444444, 0x34444444, 0x23333333, 0x22222223, 0x11111122, 0x01100111,
				0x22111111, 0x22222222, 0x23333233, 0x34333332, 0x45333333, 0x44444444, 0x45544444, 0x54455545, 0x55555545, 0x55555544, 0x44544544, 0x44444454, 0x33333334, 0x21222233, 0x11111111, 0x01101111,
				0x22221111, 0x22222221, 0x32333332, 0x33333333, 0x44433333, 0x44544444, 0x44555554, 0x55455445, 0x55555555, 0x45555555, 0x45544444, 0x44444444, 0x33343333, 0x21222233, 0x11111112, 0x00001111,
				0x12111211, 0x22323222, 0x32333322, 0x33344333, 0x34443333, 0x54544444, 0x44554455, 0x44454445, 0x55555555, 0x55545545, 0x44544545, 0x34444444, 0x44343334, 0x22223334, 0x11111111, 0x01011111,
				0x22222211, 0x33332322, 0x33333333, 0x33334433, 0x44434433, 0x55544444, 0x45545555, 0x55455555, 0x55555555, 0x55555555, 0x55555555, 0x44555554, 0x44443444, 0x32333444, 0x11112112, 0x11111111,
				0x21112211, 0x33333222, 0x33333333, 0x33323334, 0x44333333, 0x44444454, 0x44544444, 0x55445444, 0x55555555, 0x55555545, 0x54555544, 0x43444444, 0x44443444, 0x33323334, 0x11111222, 0x01111101,
				0x23211221, 0x33322232, 0x33333323, 0x43333334, 0x44344433, 0x44444444, 0x44544454, 0x54454454, 0x55555555, 0x55555555, 0x54445545, 0x44444454, 0x44444444, 0x33334334, 0x11122232, 0x11100111,
				0x22222222, 0x33332233, 0x33334333, 0x33334344, 0x45343333, 0x44443434, 0x54545454, 0x55455555, 0x55555555, 0x55555545, 0x55444545, 0x44444454, 0x44444444, 0x33334444, 0x11222223, 0x11111111,
				0x33333222, 0x33333233, 0x44454443, 0x43443444, 0x45444444, 0x44454445, 0x55445454, 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x44555555, 0x44444444, 0x33444444, 0x11223333, 0x11112222,
				0x33332212, 0x32332333, 0x43344443, 0x43334444, 0x44444444, 0x44444554, 0x54554454, 0x55555555, 0x55555555, 0x55555555, 0x54544555, 0x44445454, 0x44444444, 0x33334444, 0x22223333, 0x11112112,
				0x33322222, 0x33333333, 0x43444444, 0x43445444, 0x44444443, 0x44444443, 0x54554444, 0x55555455, 0x55555555, 0x55555555, 0x45545555, 0x44555554, 0x44444444, 0x33334444, 0x22223333, 0x11111212,
				0x33333322, 0x43333344, 0x54444444, 0x44444445, 0x44444443, 0x44544444, 0x44444454, 0x55555555, 0x65555555, 0x55555555, 0x55555555, 0x55555555, 0x44444444, 0x44444444, 0x22333333, 0x11122222,
				0x33333332, 0x44433443, 0x44444444, 0x44455445, 0x45444443, 0x44443444, 0x44444454, 0x55555554, 0x65555555, 0x55555555, 0x55555555, 0x44555455, 0x44444444, 0x44444444, 0x33333333, 0x12222222,
				0x33333322, 0x43333343, 0x54443444, 0x44444444, 0x44444433, 0x44444444, 0x55444454, 0x55555445, 0x55555555, 0x55555555, 0x55555555, 0x44554555, 0x44444444, 0x44444444, 0x33233333, 0x12222222,
				0x33333332, 0x44344333, 0x53344334, 0x54445445, 0x45444445, 0x44444444, 0x54554454, 0x55555555, 0x55555555, 0x55555555, 0x54555555, 0x44554555, 0x44444444, 0x44344444, 0x33233333, 0x12222222,
				0x34444333, 0x44444444, 0x44554454, 0x55555545, 0x45555444, 0x55544444, 0x55554555, 0x55555555, 0x65556555, 0x55555555, 0x55555555, 0x45555555, 0x55455555, 0x44445444, 0x33333334, 0x22222222,
				0x33443333, 0x44443343, 0x44444444, 0x44444444, 0x34444444, 0x44444443, 0x55445454, 0x55455445, 0x55555555, 0x55555545, 0x55555555, 0x44444454, 0x44444444, 0x44444444, 0x23333344, 0x12222222,
				0x43433333, 0x44444444, 0x43334344, 0x43333433, 0x33333334, 0x44333333, 0x44543444, 0x44444445, 0x44545444, 0x45444444, 0x44544544, 0x44444444, 0x33333334, 0x43434434, 0x22333343, 0x22222222,
				0x44443333, 0x44444444, 0x32333344, 0x33323333, 0x23333332, 0x32322322, 0x43333333, 0x33344444, 0x43333334, 0x33333333, 0x33444444, 0x33333333, 0x22222223, 0x43333333, 0x23333333, 0x22222222,
				0x44444433, 0x44554454, 0x11123344, 0x12112122, 0x12122211, 0x22111111, 0x32221221, 0x12222233, 0x32222211, 0x22111222, 0x22333333, 0x12221112, 0x11011112, 0x43323221, 0x33333334, 0x22222222,
				0x44444433, 0x44444444, 0x00001233, 0x11221222, 0x11121212, 0x11111111, 0x01111111, 0x01121301, 0x11141111, 0x11111011, 0x00001101, 0x32100100, 0x10001012, 0x32210100, 0x23333333, 0x22222222,
				0x44444433, 0x44444444, 0x00001023, 0x11212110, 0x11311221, 0x11110012, 0x22111111, 0x11111151, 0x11110131, 0x11200111, 0x00000101, 0x00011110, 0x00100002, 0x21000000, 0x23333332, 0x22222222,
				0x44444444, 0x44555554, 0x11000013, 0x21121112, 0x12222211, 0x11110111, 0x11111112, 0x21112111, 0x11102111, 0x11001101, 0x01000011, 0x00011110, 0x01000100, 0x10000000, 0x23333332, 0x22222222,
				0x44444444, 0x34555555, 0x11000002, 0x12110010, 0x11104212, 0x11100111, 0x02111121, 0x04131111, 0x10113111, 0x10111111, 0x00100001, 0x00111111, 0x12210000, 0x00000000, 0x23233321, 0x22222222,
				0x44444444, 0x34545554, 0x00001002, 0x22111000, 0x21112111, 0x11100101, 0x03222201, 0x11240012, 0x11113101, 0x00012131, 0x01000011, 0x00110000, 0x00100000, 0x00000000, 0x33333221, 0x22222222,
				0x55444444, 0x34555555, 0x56110111, 0x56754365, 0x57765655, 0x21567456, 0x24537544, 0x55446554, 0x33446795, 0x05787764, 0x42111101, 0x54324554, 0x68887754, 0x00010005, 0x33333220, 0x22222222,
				0x55555544, 0x34555555, 0x89120011, 0xcec8a9c8, 0xddeaeedd, 0xddcbecdd, 0xcbdb9bdd, 0xcccefdea, 0xcedeeeed, 0x0cedefcd, 0xdc320000, 0xeeee9fdf, 0xefefcfdc, 0x000008dd, 0x33333210, 0x22222323,
				0x45554544, 0x33455555, 0xa8111011, 0xcadac999, 0xedddccbe, 0xc86dabee, 0xa01accdc, 0xdeebeded, 0xeeedeeda, 0xbddddede, 0xba639bbd, 0xffffffcc, 0xbbc9efee, 0x00000bef, 0x33332210, 0x22222222,
				0x55554544, 0x34555555, 0x88101112, 0xddcaadb9, 0xeeedece8, 0xbccbccaf, 0xdd561cbe, 0xea8cecbf, 0xdffccefd, 0xeeefdfce, 0x216bfede, 0xecdfde32, 0x0110efed, 0x00000cf7, 0x33333220, 0x22122323,
				0x45555544, 0x34555555, 0x40010112, 0x66545643, 0x36973da5, 0xaa565023, 0xbe5781bd, 0x879eecca, 0xca77a9a9, 0x978cdeed, 0x09bcbbbb, 0x94676001, 0x01208fdf, 0x00010580, 0x33333320, 0x22222223,
				0x55555555, 0x35555555, 0x11011112, 0x00101011, 0x01101000, 0x21110111, 0x00222010, 0x12000000, 0x01111121, 0x12100000, 0x20020001, 0x13100100, 0x11110000, 0x00100000, 0x34443330, 0x22333333,
				0x55554544, 0x34555555, 0x11111113, 0x01010000, 0x01101111, 0x11111111, 0x11112111, 0x10121111, 0x11211212, 0x11111111, 0x11111111, 0x11100001, 0x11001011, 0x00000000, 0x34433321, 0x22233333,
				0x55454544, 0x44555555, 0x11111113, 0x02201001, 0x10000111, 0x20011111, 0x11011221, 0x12110111, 0x11111111, 0x12111111, 0x11111111, 0x01110100, 0x11010101, 0x10000011, 0x34334332, 0x22223333,
				0x55555555, 0x45555555, 0x11111123, 0x00100000, 0x10110121, 0x11111110, 0x21113112, 0x11101012, 0x11111111, 0x11111111, 0x00100111, 0x11111011, 0x11100101, 0x20000111, 0x44333332, 0x23333333,
				0x55555545, 0x45555555, 0x01001123, 0x65222663, 0x00145576, 0x00020001, 0x11111000, 0x10111111, 0x11121112, 0x00011111, 0x9c711023, 0x11110057, 0x11111010, 0x22011101, 0x33334333, 0x22233333,
				0x55544544, 0x45555555, 0x40121123, 0xeeedefee, 0x8deeeeee, 0x03afd005, 0x01201110, 0x11111111, 0x22111211, 0xc9402211, 0xfff70cdd, 0x0101affd, 0x01101101, 0x32211001, 0x33334333, 0x23333333,
				0x55544444, 0x44555555, 0xa0012223, 0xdedebcee, 0xdeececee, 0xefdcf526, 0x111107ad, 0x11122101, 0x21111112, 0xeecb8312, 0xfe933ceb, 0x06bffeee, 0x11110111, 0x33221111, 0x33333333, 0x22233333,
				0x55555555, 0x45555555, 0x31123323, 0xfffffafc, 0xded8dfff, 0xfebce804, 0x0100bedf, 0x21121212, 0x11110122, 0xeeedbd71, 0xe6102dfe, 0xbfeebddf, 0x10111010, 0x44432110, 0x44444444, 0x33333333,
				0x55544544, 0x45555555, 0x02343333, 0xdabab960, 0xcbb5a9d7, 0xeeeec603, 0x110aefef, 0x11111221, 0x31111112, 0xedfbcedb, 0x400107ee, 0xefafeeec, 0x111018ad, 0x44332101, 0x34434444, 0x22333333,
				0x55555544, 0x44555554, 0x04211224, 0xceaf7321, 0xedd9eded, 0xff970016, 0x029efeee, 0x11112221, 0xc0011121, 0xdeeefeef, 0x0010006d, 0xefeefeca, 0x1112eeff, 0x44332111, 0x34334444, 0x23333333,
				0x55555555, 0x45555555, 0x11112234, 0xdcc7c011, 0xddecdcad, 0xfc001107, 0x8eeffdfe, 0x11222211, 0xf9202112, 0xdeedeeff, 0x0000108d, 0xeffffffa, 0x1107ceff, 0x44322011, 0x34444444, 0x33333333,
				0x55555555, 0x55555555, 0x11211235, 0x8dc8c800, 0xfeeddedc, 0xec011114, 0xefefdfef, 0x22212125, 0xcc221122, 0xeedeeffe, 0x0111117d, 0xeffdfffa, 0x010deffe, 0x54332110, 0x44444444, 0x33333344,
				0x55545555, 0x55555555, 0x12112345, 0xefa9b901, 0x9ad7eaac, 0xdc221016, 0xfffedfbf, 0x3322210c, 0xe3212221, 0xeefee9ed, 0x0101103e, 0xffeedef9, 0x101bdfee, 0x44322111, 0x34444444, 0x33333333,
				0x55545555, 0x55555555, 0x21212345, 0x8acccb52, 0xeddcbb9a, 0xf9322227, 0xedfefefe, 0x222222ac, 0x01012223, 0xbe702400, 0x0011022b, 0xffffcefc, 0x110afeff, 0x44332010, 0x34444444, 0x33333333,
				0x55555555, 0x55555555, 0x14221355, 0x8db98d81, 0xdfffcbac, 0xee121124, 0xe9edcfbf, 0x222023ee, 0x8ac60322, 0xe4202567, 0x0100111b, 0xfdffefbc, 0x1009faff, 0x44332111, 0x44444444, 0x33333444,
				0x55555545, 0x55555555, 0x12422345, 0xecedee81, 0xbfddcede, 0xfd011211, 0xdeebebdc, 0x22200aee, 0xfffb1222, 0x1005adfe, 0x01110003, 0xdfffeefc, 0x0019dfe8, 0x44322111, 0x44444444, 0x33333444,
				0x55555555, 0x55555555, 0x21251345, 0xdfdfef72, 0xc9dcddfb, 0xef212221, 0xafefecff, 0x22222dbe, 0x9fee5321, 0x59dfbfdd, 0x11211111, 0xfffeeefd, 0x0119afee, 0x44322110, 0x44444444, 0x33333444,
				0x55555555, 0x55555555, 0x22222345, 0xfffeff72, 0xcffeefff, 0xdf511222, 0xbeeefffd, 0x22129fee, 0xceefe422, 0xbabecdcd, 0x21111100, 0xdfefcccc, 0x110aefdc, 0x44322110, 0x44444444, 0x33333334,
				0x55555555, 0x55555555, 0x22122355, 0xfefdf962, 0xdffefffe, 0xff723222, 0x7feffefe, 0x2222cfef, 0xcdeeed12, 0xccececf9, 0x11101000, 0xeffedddd, 0x110cff8e, 0x54432110, 0x45455555, 0x34444444,
				0x55555555, 0x55555555, 0x22122345, 0xffffec72, 0xcffeffff, 0xe9751225, 0xafefccee, 0x2321ffee, 0xaebeef42, 0xadb2cdde, 0x11001000, 0xcfeeedd8, 0x110e9ebe, 0x44321111, 0x44444444, 0x33333444,
				0x55555555, 0x55555555, 0x12112345, 0xd9baad52, 0xffffffad, 0xea001235, 0xbeeceeff, 0x3208effe, 0xccedee02, 0xceeedddd, 0x10001000, 0xafcdeed9, 0x003eedff, 0x44321101, 0x44444444, 0x33333444,
				0x55555555, 0x55555555, 0x21231355, 0xfffddf61, 0xfffffffe, 0xc2111225, 0xfedffffe, 0x220dfdff, 0x9feeed02, 0xbecaaeec, 0x10001110, 0xdf9dcdcb, 0x110cccfb, 0x44321111, 0x44445554, 0x34333444,
				0x55555555, 0x55555555, 0x22321455, 0xeecdcc62, 0xfeeedcfb, 0x31122216, 0xdeefcfff, 0x222eeefe, 0xabdcfb12, 0xaecccb7e, 0x61201000, 0x8cbdabe8, 0x112ecffb, 0x44321111, 0x45444544, 0x33333444,
				0x55555555, 0x55555555, 0x22323355, 0xadfefe73, 0xfffeeeee, 0x15321227, 0xeffbefe9, 0x313fffef, 0xbbadd923, 0xaedcceb9, 0xe3211100, 0xeca5eade, 0x009eff9f, 0x44321011, 0x45444544, 0x34333444,
				0x55555555, 0x55555565, 0x22321345, 0xeedbbca1, 0xdfbddecd, 0x6f011123, 0xffeffeb0, 0x220dffff, 0xbacbde52, 0xbdcdcccc, 0xcaa50010, 0x9fbacbd9, 0x12efd99e, 0x44311111, 0x44444444, 0x33333444,
				0x66666655, 0x56666666, 0x23111355, 0xdedeab81, 0x7ef9eedd, 0x7e101113, 0xfeefefe4, 0x211fffff, 0x8aadcd72, 0xded8eddc, 0xdee61220, 0x9bcddfab, 0x16ff7bfb, 0x54321100, 0x44445555, 0x34444444,
				0x55655655, 0x55655565, 0x22310345, 0xeebd6112, 0x8ecdeeca, 0xef301121, 0xeeffefee, 0x110eefff, 0x56adbc71, 0xbe9aa9b8, 0x64100106, 0xb9ddb956, 0x209fddcc, 0x44311111, 0x44444444, 0x33344444,
				0x55555655, 0x55555555, 0x13111345, 0xdcb02570, 0xdfedffcc, 0xddb21111, 0xfffffede, 0x010efffe, 0x03dccb41, 0xecaacd50, 0x02111109, 0x01572220, 0x11099f50, 0x43321111, 0x44444444, 0x33334444,
				0x55555555, 0x55555565, 0x22121345, 0x21006eb0, 0xeedfefe7, 0xdba21004, 0xeedbdbed, 0x111fefed, 0x21cdca01, 0xeeeeda20, 0x00212216, 0x01110000, 0x11212600, 0x44321111, 0x44444444, 0x33333444,
				0x56666655, 0x55666566, 0x12222355, 0x4bdfffa1, 0xefded884, 0xff922227, 0xfeffefef, 0x123effff, 0x79cda811, 0xeedec379, 0x22222106, 0x22111121, 0x11011001, 0x54322111, 0x45444444, 0x33433444,
				0x55555655, 0x55555565, 0x41421355, 0xbfeebd81, 0xfefc1123, 0xe5612225, 0xfffefcef, 0x122fffff, 0x8bdca612, 0xcdd5860c, 0x23332108, 0x11111201, 0x11110001, 0x44322111, 0x44444444, 0x33333434,
				0x55555555, 0x55555565, 0x22112455, 0xeebdfd63, 0xee7418ee, 0xf7122223, 0xffffffff, 0x121fffff, 0xaaca9422, 0xbb9baaba, 0x3232330a, 0x11112122, 0x11110001, 0x44332111, 0x44444444, 0x33333434,
				0x55555555, 0x55555665, 0x21222455, 0xefeeee63, 0xc9547fdc, 0xef012221, 0xdeffeeff, 0x010effff, 0xecbcd611, 0xfdecedaa, 0x01122228, 0x11121112, 0x11206871, 0x44432111, 0x44444444, 0x33333444,
				0x55555555, 0x55555565, 0x01212455, 0xedeed932, 0x5edeecee, 0xfe011112, 0xfffffdff, 0x110affff, 0xceced511, 0xfeeaedde, 0x11222208, 0x11122211, 0x1116bbc3, 0x44432122, 0x34444444, 0x33333444,
				0x55555655, 0x55555554, 0x10023455, 0xfefffe01, 0x5fffefef, 0xec012222, 0xfeecdeef, 0x1114ffff, 0xccbbb011, 0xecefbebb, 0x11221217, 0x12212310, 0x2118cef8, 0x44332102, 0x44334444, 0x33333433,
				0x55555555, 0x55555554, 0x01213455, 0xedbdc811, 0xaf7eedea, 0x88021122, 0xfffffeef, 0x12207fff, 0xdacc7021, 0xdeddecca, 0x11222116, 0x02243210, 0x211adede, 0x43332000, 0x34334444, 0x23333333,
				0x55666655, 0x55555555, 0x11023555, 0xffffeb00, 0xeeffdeee, 0xf7222235, 0xfdffffff, 0x21220bff, 0xdded0201, 0xfdedccde, 0x11111336, 0x52312221, 0x220ddeff, 0x44332110, 0x44444444, 0x33333433,
				0x55555555, 0x55555555, 0x11013455, 0xcefefd01, 0xfffeeffa, 0xf6212315, 0xfdefefff, 0x222204fe, 0xceb71123, 0xebeccaed, 0x01223228, 0x92212212, 0x010cfeef, 0x44331021, 0x34334444, 0x23333333,
				0x55555555, 0x55655555, 0x21012455, 0xeeefec01, 0xeffffffe, 0xcb022205, 0xffbfeeee, 0x122222cf, 0x9ba01221, 0xacdddedb, 0x1122221a, 0xc1222222, 0x112dfcef, 0x43331111, 0x34333344, 0x23332333,
				0x55555655, 0x56655565, 0x10112455, 0xeeeffb02, 0xefefffff, 0xff231123, 0xee9fffff, 0x2122228f, 0xb8212211, 0xdddc9add, 0x12121117, 0xe4223212, 0x101ebedd, 0x44321111, 0x34333444, 0x23322333,
				0x55555655, 0x55666665, 0x11112345, 0xddfeed01, 0xeffffeff, 0xfd512214, 0x7cdbedde, 0x1222220c, 0xa5222212, 0xddca9dca, 0x22211126, 0xde412222, 0x110bdddd, 0x44321001, 0x34334444, 0x23333333,
				0x55555555, 0x55655565, 0x11111235, 0xdecaeb11, 0xdefdfefe, 0xefa12112, 0xf7ddfeee, 0x13212134, 0x61221111, 0xeddc9ca9, 0x2321222a, 0xefd72123, 0x1108edee, 0x43322011, 0x33333443, 0x23333333,
				0x55555555, 0x55655665, 0x21111235, 0xeeefee41, 0xeefffffd, 0xdeb11212, 0x8cedccdc, 0x11121120, 0x21212122, 0xdeddbee8, 0x2222223d, 0xdeda8042, 0x1114ffdd, 0x43332001, 0x33333443, 0x33323233,
				0x55655655, 0x55666655, 0x01122014, 0xefafdf32, 0xefdccddc, 0xeee31122, 0x1aecffde, 0x11223222, 0x12211121, 0xcecedc71, 0x2222337c, 0xedcac932, 0x0115efdd, 0x44432110, 0x33344444, 0x33333333,
				0x56555555, 0x45666665, 0x11111103, 0xeeec9520, 0xeffffefe, 0xeee80112, 0x233aedfe, 0x21221132, 0x21211112, 0xddccc521, 0x031233bd, 0xeedecbb4, 0x1116edee, 0x43322111, 0x33343444, 0x22323333,
				0x55655555, 0x45666666, 0xa0000113, 0xffe6008f, 0xfadedfff, 0xefee9112, 0x323259de, 0x21122122, 0x11122112, 0xadca1221, 0xa6231abb, 0xef9cbcae, 0x2116ecce, 0x43322112, 0x33334443, 0x22222333,
				0x55555555, 0x45665565, 0xf7301012, 0xfd010cdf, 0xee7bedfd, 0xfabed226, 0x14112227, 0x12122422, 0x11221212, 0xdbc71102, 0xc9315ddc, 0xd56cbedc, 0x2136eeee, 0x33221122, 0x33333333, 0x22222323,
				0x55655555, 0x55666666, 0x70000013, 0x8011afeb, 0xea46569c, 0x57de620c, 0x31221210, 0x21332223, 0x12222122, 0xcdc61221, 0x962237dc, 0x20247887, 0x1214bcea, 0x32211110, 0x33333443, 0x23222223,
				0x55555555, 0x45655565, 0x10110003, 0x21216500, 0x30011131, 0x21802122, 0x33110210, 0x13212243, 0x11111222, 0x75322431, 0x1202224a, 0x11232312, 0x21411b51, 0x21111001, 0x33333332, 0x22222222,
				0x55555555, 0x55655665, 0x10000013, 0x11231011, 0x12101221, 0x31231112, 0x21212222, 0x32322432, 0x22111111, 0x22111241, 0x22211121, 0x11022322, 0x11022154, 0x11121021, 0x33333322, 0x22222222,
				0x55555555, 0x45666555, 0x01111013, 0x12311201, 0x22111012, 0x33111112, 0x12111220, 0x34334233, 0x11122242, 0x12212322, 0x22211232, 0x44133122, 0x11123112, 0x11100101, 0x33333321, 0x22222333,
				0x55555555, 0x45666565, 0x01110023, 0x11011101, 0x11311111, 0x22111121, 0x22212323, 0x34432312, 0x13213323, 0x22132321, 0x32122121, 0x22222322, 0x12111212, 0x11012010, 0x33333321, 0x22222333,
				0x55555555, 0x45555565, 0x20111102, 0x55100001, 0x13111010, 0x11235673, 0x66554440, 0x56634566, 0x21121025, 0x12211111, 0x21211121, 0x11112011, 0x11102110, 0x11110001, 0x33333221, 0x22222222,
				0x55555555, 0x45556555, 0xb7001011, 0xececabbd, 0xcccbac0b, 0xeececc7b, 0xdfeffeee, 0x9eecefed, 0x88aaaacf, 0x8679a866, 0x6659a869, 0x87baaa89, 0xf769eaac, 0x131107de, 0x33333211, 0x22222322,
				0x55555555, 0x45556555, 0xbb001211, 0xddddbecc, 0xccba9abb, 0xeeeeecbb, 0xeffffeff, 0xeceddedd, 0xddedbdbe, 0xcdffffff, 0xdfffeeef, 0xcdfdcfef, 0xfaecfdee, 0x10110ade, 0x34333221, 0x22222223,
				0x55555555, 0x45555555, 0x96001001, 0xccddcedd, 0xc81005ed, 0xeeeeeedc, 0xdfeedfef, 0xccedcfde, 0xdeecdede, 0xcbfeefff, 0xbfedfe8e, 0xfdefcdee, 0xebfdfccb, 0x01111101, 0x33333211, 0x22222232,
				0x55555555, 0x45555555, 0x00010212, 0xb87aba53, 0xd91219ee, 0xddabe60b, 0x9876539e, 0xdaaaced9, 0xecbcccbd, 0xe6678fff, 0xabffc9fe, 0xbbbbcede, 0x5bfbbecb, 0x11111111, 0x33333221, 0x22222223,
				0x55555554, 0x45555555, 0x21113103, 0x61100011, 0x01122006, 0x00200120, 0x12211200, 0x02211001, 0xd4110000, 0xd4211cec, 0x0106007b, 0x22211000, 0x0a9d8300, 0x10220121, 0x33333321, 0x22222323,
				0x55555544, 0x55555555, 0x21411124, 0x11111211, 0x21211111, 0x42112211, 0x10112000, 0x22324231, 0x12321313, 0x02242011, 0x11213211, 0x12222212, 0x10011122, 0x11112112, 0x33333332, 0x22222333,
				0x55555544, 0x55555555, 0x23101234, 0x00221111, 0x12001110, 0x10221121, 0x03131024, 0x11221322, 0x22211231, 0x22432322, 0x12121233, 0x22221122, 0x11122212, 0x21212210, 0x33334332, 0x22222333,
				0x55555544, 0x55555555, 0x31111345, 0x01121111, 0x11000110, 0x21111111, 0x23112231, 0x32233221, 0x22111212, 0x32333242, 0x11112222, 0x12122122, 0x12112121, 0x22111111, 0x33333333, 0x22222333,
				0x55555544, 0x55555555, 0x11134555, 0x31112123, 0x10011111, 0x11122120, 0x43211212, 0x13223432, 0x11112023, 0x32322333, 0x21132224, 0x11122121, 0x21121112, 0x33211101, 0x34334333, 0x22222333,
				0x55544443, 0x55555555, 0x23345555, 0x12221422, 0x10010100, 0x11132211, 0x22212113, 0x33144344, 0x22211212, 0x23233321, 0x12221333, 0x31122223, 0x02122221, 0x33322111, 0x33333333, 0x12222323,
				0x55544443, 0x55555555, 0x44555555, 0x22223334, 0x23333322, 0x22222222, 0x33333233, 0x22222222, 0x22212222, 0x32122112, 0x11221212, 0x12222121, 0x11122111, 0x43333221, 0x33333333, 0x22222223,
				0x55444433, 0x55555555, 0x55545555, 0x43434445, 0x44444433, 0x43444444, 0x44444444, 0x33333344, 0x33333334, 0x22333222, 0x33322222, 0x33333232, 0x22122222, 0x33333332, 0x23333333, 0x12222333,
				0x55544444, 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555455, 0x44555555, 0x44445455, 0x44444444, 0x44444434, 0x44444444, 0x33233334, 0x44444434, 0x33333343, 0x12222333,
				0x44444433, 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x44555555, 0x55555555, 0x55555555, 0x54455555, 0x55445444, 0x45544444, 0x44444454, 0x44333344, 0x33334434, 0x33223333, 0x11122223,
				0x44444433, 0x55555555, 0x45555555, 0x55555555, 0x55555555, 0x55555555, 0x54555555, 0x55555555, 0x55555555, 0x45555555, 0x55555554, 0x44444455, 0x44344444, 0x33334444, 0x33333333, 0x11222222,
				0x44444433, 0x55555554, 0x55555555, 0x55555555, 0x55555555, 0x45555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55554555, 0x44555455, 0x44344344, 0x43334444, 0x33333333, 0x12222223,
				0x55444443, 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x44554555, 0x44444445, 0x44344444, 0x23333433, 0x22222223,
				0x44443433, 0x54555444, 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555554, 0x55555555, 0x55455555, 0x55555544, 0x54555545, 0x44444555, 0x33344444, 0x33334444, 0x23233333, 0x11222222,
				0x44433433, 0x54544444, 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x54455455, 0x45555555, 0x55545555, 0x45544454, 0x43344444, 0x33434444, 0x23333333, 0x12222222,
				0x44444433, 0x55555554, 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55455555, 0x55555555, 0x55555555, 0x55555555, 0x44454444, 0x33444444, 0x33333333, 0x12222222,
				0x44433333, 0x54444444, 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x54444455, 0x45555554, 0x55555544, 0x44544555, 0x33444444, 0x33334434, 0x22233333, 0x11122222,
				0x44333332, 0x44444444, 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x54445555, 0x55555555, 0x55554555, 0x44554555, 0x33444344, 0x33334334, 0x22222333, 0x11112112,
				0x43333332, 0x44444444, 0x45555455, 0x55555555, 0x55555554, 0x55554555, 0x55555555, 0x55555555, 0x55445555, 0x45545554, 0x55554544, 0x44545555, 0x33344334, 0x33333344, 0x22122222, 0x11111111,
				0x44333332, 0x55554444, 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x45545555, 0x44444444, 0x34444444, 0x22222333, 0x11111111,
				0x33322322, 0x44443443, 0x44454444, 0x54555555, 0x55555555, 0x55544455, 0x55555555, 0x55555555, 0x54455445, 0x55545544, 0x55555544, 0x44444455, 0x33344444, 0x33333333, 0x12222223, 0x11111111,
				0x33332222, 0x44443333, 0x44454444, 0x55555444, 0x55545555, 0x55555554, 0x55555555, 0x55555555, 0x54545445, 0x55455555, 0x55554544, 0x44444455, 0x33344444, 0x33333333, 0x12122223, 0x11111111,
				0x33322222, 0x34433333, 0x44444444, 0x55555445, 0x55555544, 0x55544554, 0x55555555, 0x55555555, 0x55555455, 0x55555554, 0x45544545, 0x44444454, 0x34444444, 0x33334333, 0x12122222, 0x01111112,
				0x33333222, 0x44444443, 0x55444444, 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x44544555, 0x44444455, 0x33333334, 0x12223333, 0x11111122,
				0x32222211, 0x33333333, 0x44443333, 0x44444444, 0x55444544, 0x44554554, 0x55555554, 0x55555555, 0x54555555, 0x45445444, 0x44544544, 0x44444444, 0x34444444, 0x32233334, 0x12222232, 0x11011111,
				0x22222211, 0x33333333, 0x43343333, 0x44444444, 0x45444444, 0x44544554, 0x55555554, 0x55555555, 0x54455555, 0x44445544, 0x44544544, 0x44444444, 0x34444444, 0x22223333, 0x12222222, 0x11010111,
				0x22222111, 0x33333333, 0x44343333, 0x44444444, 0x45444444, 0x45544454, 0x55555554, 0x55555555, 0x55555555, 0x44445554, 0x44555544, 0x44444444, 0x33444444, 0x22233333, 0x22222222, 0x11111111,
				0x22212211, 0x33333222, 0x43333333, 0x44444444, 0x44444444, 0x44544554, 0x55555554, 0x55555555, 0x55555555, 0x45555555, 0x54544444, 0x44444454, 0x34444444, 0x22223333, 0x12222222, 0x11111111,
				0x22112212, 0x32322222, 0x33333333, 0x44434344, 0x44444444, 0x44444544, 0x44555454, 0x44455555, 0x54445444, 0x44445544, 0x44444544, 0x44444444, 0x23343344, 0x22222223, 0x11212221, 0x01111111,
				0x22211111, 0x22222222, 0x33333332, 0x44334333, 0x44444444, 0x44433444, 0x44444443, 0x44455445, 0x44445444, 0x34444444, 0x44444444, 0x33444444, 0x33343334, 0x22222222, 0x11112111, 0x00111111,
				0x22211111, 0x23322222, 0x33333333, 0x44444433, 0x45444444, 0x54544444, 0x55555544, 0x45555555, 0x54445445, 0x44455545, 0x44544544, 0x34444444, 0x33333334, 0x22222222, 0x11222222, 0x11111111,
				0x21211111, 0x22222222, 0x33333223, 0x43333333, 0x44344444, 0x44443444, 0x55444443, 0x44454555, 0x54444444, 0x44445544, 0x44444444, 0x33443344, 0x22333333, 0x22222222, 0x11111111, 0x01111111,
				0x21111111, 0x22222222, 0x33232222, 0x43333333, 0x44334443, 0x44444444, 0x44544444, 0x44454445, 0x54444444, 0x44444444, 0x44444433, 0x33444344, 0x22233333, 0x22222122, 0x11111111, 0x00111111,
				0x11111111, 0x22222122, 0x32232222, 0x33333323, 0x33333333, 0x44433444, 0x44444444, 0x44444445, 0x44444344, 0x44444444, 0x44444444, 0x33443344, 0x22233333, 0x21222112, 0x11111111, 0x00111111
			};

			void VSMain (inout float4 vertex:POSITION, inout float2 uv:TEXCOORD0)
			{
				vertex = UnityObjectToClipPos(vertex);
			}

			void PSMain (float4 vertex:POSITION, float2 uv:TEXCOORD0, out float4 pixel:SV_TARGET) 
			{
				int3 f = int3( uv * size, 0 );
				if( f.x >= 0 && f.y >= 0 && f.x < int(size.x) && f.y < int(size.y) )
				{
					f.z = (bitmap[(f.y << 4) + (f.x >> 3)] >> ((f.x & 0x07) << 2)) & 0xf;
				}
				int i = palette[f.z];
				pixel = float4(float(i & 0xff) / 255, float((i >> 8) & 0xff) / 255, float((i >> 16) & 0xff) / 255, 0);
			}
			ENDCG
		}
	}
}